import Vue from 'vue';
import Router from 'vue-router';
import home from './views/home.vue';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '*',
      redirect: 'home'
    },
    {
      path: '/',
      redirect: 'homePage'
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('./views/login.vue')
      // component: resolve => require(['pages/main/main'], resolve),
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('./views/home.vue'),
      children: [
        {
          path: '/homePage',
          name: 'homePage',
          component: () => import('./views/homePage.vue')
        },
        {
          path: '/myCount',
          name: 'myCount',
          component: () => import('./views/myCount.vue')
        },
        {
          path: '/produceCategory',
          name: 'produceCategory',
          component: () => import('./views/goods/produceCategory.vue')
        },
        {
          path: '/produceCategoryCreate',
          name: 'produceCategoryCreate',
          component: () => import('./views/goods/produceCategoryCreate.vue')
        },
        {
          path: '/roleList',
          name: 'roleList',
          component: () => import('./views/roleList.vue')
        },
        {
          path: '/roleCreate',
          name: 'roleCreate',
          component: () => import('./views/roleCreate.vue')
        },
        {
          path: '/accountList',
          name: 'accountList',
          component: () => import('./views/accountList.vue')
        },
        {
          path: '/accountCreate',
          name: 'accountCreate',
          component: () => import('./views/accountCreate.vue')
        },
        {
          path: '/logList',
          name: 'logList',
          component: () => import('./views/logList.vue')
        },
        {
          path: '/produceList',
          name: 'produceList',
          component: () => import('./views/goods/produceList.vue')
        },
        {
          path: '/produceIn',
          name: 'produceIn',
          component: () => import('./views/goods/produceIn.vue')
        },
        {
          path: '/produceHas',
          name: 'produceHas',
          component: () => import('./views/produceHas.vue')
        },
        {
          path: '/produceListCreate',
          name: 'produceListCreate',
          component: () => import('./views/goods/produceListCreate.vue')
        },
        {
          path: '/produceInCheck',
          name: 'produceInCheck',
          component: () => import('./views/produceInCheck.vue')
        },
        {
          path: '/goodsDetail',
          name: 'goodsDetail',
          component: () => import('./views/goods/goodsDetail.vue')
        },
        {
          path: '/produceInCreate',
          name: 'produceInCreate',
          component: () => import('./views/goods/produceInCreate.vue')
        },
        {
          path: '/produceOut',
          name: 'produceOut',
          component: () => import('./views/goods/produceOut.vue')
        },
        {
          path: '/goodSupList',
          name: 'goodSupList',
          component: () => import('./views/goods/goodSupList.vue')
        },
        {
          path: '/produceOutCreate',
          name: 'produceOutCreate',
          component: () => import('./views/goods/produceOutCreate.vue')
        },
        {
          path: '/produceOutCheck',
          name: 'produceOutCheck',
          component: () => import('./views/goods/produceOutCheck.vue')
        },
        {
          path: '/compare',
          name: 'compare',
          component: () => import('./views/goods/compare.vue')
        },
        {
          path: '/customerList',
          name: 'customerList',
          component: () => import('./views/order/customerList.vue')
        },
        {
          path: '/customerListCreate',
          name: 'customerListCreate',
          component: () => import('./views/order/customerListCreate.vue')
        },
        {
          path: '/order',
          name: 'order',
          component: () => import('./views/order/order.vue')
        },
        {
          path: '/orderCreate',
          name: 'orderCreate',
          component: () => import('./views/order/orderCreate.vue')
        },
        {
          path: '/orderStatusCheck',
          name: 'orderStatusCheck',
          component: () =>
            import('./views/order/orderStatus/orderStatusCheck.vue')
        },
        {
          path: '/daichuhuo',
          name: 'daichuhuo',
          component: () =>
            import('./views/order/orderStatus/daichuhuo.vue')
        },
        {
          path: '/productList',
          name: 'productList',
          component: () => import('./views/order/productList.vue')
        },
        {
          path: '/productListWait',
          name: 'productListWait',
          component: () =>
            import('./views/order/productListStatus/productListWait.vue')
        },
        {
          path: '/productListStart',
          name: 'productListStart',
          component: () =>
            import('./views/order/productListStatus/productListStart.vue')
        },
        {
          path: '/inStock',
          name: 'inStock',
          component: () => import('./views/order/productListStatus/inStock.vue')
        },
        {
          path: '/orderGoods',
          name: 'orderGoods',
          component: () => import('./views/order/orderGoods.vue')
        },
        {
          path: '/accessList',
          name: 'accessList',
          component: () => import('./views/access/accessList.vue')
        },
        {
          path: '/accessListCreate',
          name: 'accessListCreate',
          component: () => import('./views/access/accessListCreate.vue')
        },
        {
          path: '/accessStock',
          name: 'accessStock',
          component: () => import('./views/access/accessStock.vue')
        },
        {
          path: '/accessInOut',
          name: 'accessInOut',
          component: () => import('./views/access/accessInOut.vue')
        },
        {
          path: '/accessOut',
          name: 'accessOut',
          component: () => import('./views/access/accessOut.vue')
        },
        {
          path: '/accessIn',
          name: 'accessIn',
          component: () => import('./views/access/accessIn.vue')
        },
        {
          path: '/accessOutCreate',
          name: 'accessOutCreate',
          component: () => import('./views/access/accessOutCreate.vue')
        },
        {
          path: '/accessOutCheck',
          name: 'accessOutCheck',
          component: () => import('./views/access/accessOutCheck.vue')
        },
        {
          path: '/accessInCreate',
          name: 'accessInCreate',
          component: () => import('./views/access/accessInCreate.vue')
        },
        {
          path: '/accessInCheck',
          name: 'accessInCheck',
          component: () => import('./views/access/accessInCheck.vue')
        },
        {
          path: '/accessCompare',
          name: 'accessCompare',
          component: () => import('./views/access/accessCompare.vue')
        },
        {
          path: '/supplierList',
          name: 'supplierList',
          component: () => import('./views/supplier/supplierList.vue')
        },
        {
          path: '/supplierOrder',
          name: 'supplierOrder',
          component: () => import('./views/supplier/supplierOrder.vue')
        },
        {
          path: '/supplierOrderCreate',
          name: 'supplierOrderCreate',
          component: () => import('./views/supplier/supplierOrderCreate.vue')
        },
        {
          path: '/supplierSupList',
          name: 'supplierSupList',
          component: () => import('./views/supplier/supplierSupList.vue')
        },
        {
          path: '/supplierOrderCheck',
          name: 'supplierOrderCheck',
          component: () => import('./views/supplier/supplierOrderCheck.vue')
        },
        {
          path: '/supplierReturn',
          name: 'supplierReturn',
          component: () => import('./views/supplier/supplierReturn.vue')
        },
        {
          path: '/supplierReturnCheck',
          name: 'supplierReturnCheck',
          component: () => import('./views/supplier/supplierReturnCheck.vue')
        },
        {
          path: '/supplierReturnCreate',
          name: 'supplierReturnCreate',
          component: () => import('./views/supplier/supplierReturnCreate.vue')
        },
        {
          path: '/supplierListCreate',
          name: 'supplierListCreate',
          component: () => import('./views/supplier/supplierListCreate.vue')
        },
        {
          path: '/supplierSup',
          name: 'supplierSup',
          component: () => import('./views/supplier/supplierSup.vue')
        },
        {
          path: '/supplierSummary',
          name: 'supplierSummary',
          component: () => import('./views/supplier/supplierSummary.vue')
        },
        {
          path: '/supplierToStroke',
          name: 'supplierToStroke',
          component: () => import('./views/supplier/supplierToStroke.vue')
        },
        {
          path: '/auxiliaryStock',
          name: 'auxiliaryStock',
          component: () => import('./views/auxiliary/auxiliaryStock.vue')
        },
        {
          path: '/auxiliaryList',
          name: 'auxiliaryList',
          component: () => import('./views/auxiliary/auxiliaryList.vue')
        },
        {
          path: '/auxiliaryListCreate',
          name: 'auxiliaryListCreate',
          component: () => import('./views/auxiliary/auxiliaryListCreate.vue')
        },
        {
          path: '/auxiliaryIn',
          name: 'auxiliaryIn',
          component: () => import('./views/auxiliary/auxiliaryIn.vue')
        },
        {
          path: '/auxiliaryInCheck',
          name: 'auxiliaryInCheck',
          component: () => import('./views/auxiliary/auxiliaryInCheck.vue')
        },
        {
          path: '/auxiliaryInCreate',
          name: 'auxiliaryInCreate',
          component: () => import('./views/auxiliary/auxiliaryInCreate.vue')
        },
        {
          path: '/auxiliaryOutCreate',
          name: 'auxiliaryOutCreate',
          component: () => import('./views/auxiliary/auxiliaryOutCreate.vue')
        },
        {
          path: '/auxiliaryOutCheck',
          name: 'auxiliaryOutCheck',
          component: () => import('./views/auxiliary/auxiliaryOutCheck.vue')
        },
        {
          path: '/auxiliaryOut',
          name: 'auxiliaryOut',
          component: () => import('./views/auxiliary/auxiliaryOut.vue')
        },
        {
          path: '/auxiliaryInOut',
          name: 'auxiliaryInOut',
          component: () => import('./views/auxiliary/auxiliaryInOut.vue')
        },
        {
          path: '/auxiliaryCompare',
          name: 'auxiliaryCompare',
          component: () => import('./views/auxiliary/auxiliaryCompare.vue')
        },
        {
          path: '/toStroke',
          name: 'toStroke',
          component: () => import('./views/order/productListStatus/toStroke.vue')
        },
      ]
    }
  ]
});
